<template>
  <el-tabs
    v-model="activeName"
    style="height: 100%;"
    tabPosition="left"
  >
    <el-tab-pane label="基本信息" name="基本信息">
      <div p4  w="240px">
        <p>项目名称</p>
        <ElInput :model-value="oProject.name"/>
      </div>
    </el-tab-pane>
    <el-tab-pane label="程序集" name="程序集">
      <ProjectModules />
    </el-tab-pane>
  </el-tabs>
</template>

<script setup lang="ts">
import { useLocalStorage } from '@vueuse/core';
import { oProject } from '~/models/Project';

const activeName = useLocalStorage('tab-project-subtab', '基本信息')


onMounted(() => {
  // console.log('Storage', oProject.value.storage);
  
  console.assert(oProject.value.modulesEnabled)
  if (!oProject.value.modulesEnabled.includes('builtin')) {
    oProject.value.modulesEnabled.push('builtin')
  }
})
</script>
